﻿@model TN_CMS.Admin.Models.LoginModel 

@{
    ViewBag.Title = "Login";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

@section head {
    <script type="text/javascript" src="@Url.Content("~/Scripts/Model/Account/LoginModel.js")"></script>
    <script type="text/javascript">
        var returnUrl = "@Convert.ToString(Request.QueryString["returnUrl"])";
        var loginModel = new LoginModel();

        $(function () {
            loginModel.Init({
                returnUrl: returnUrl != "" ? returnUrl : "/"
            });
        });
    </script>
}

<div id="dialog-login" title="Login to TN CMS">
    @using (Html.BeginForm())
    {
    <table cellpadding="5" class="fod-form">
        <tr>
            <td class="fod-label">
                UserName
            </td>
            <td class="fod-input">
                @Html.TextBoxFor(
                    m => m.Uid,
                    new { @class = "fod-textbox", style = "width:220px" }
                )
            </td>
        </tr>
        <tr>
            <td class="fod-label">
                Password
            </td>
            <td class="fod-input">
                @Html.PasswordFor(
                    m => m.Pwd,
                    new { @class = "fod-textbox", style = "width:220px" }
                )
            </td>
        </tr>
    </table>
    }
</div>
